//
//  AppStats.h
//  navigation
//
//  Created by ppcfan on 10-9-9.
//

#import <Foundation/Foundation.h>

#define APP_CONNECT_URL @"http://appstatistics.appspot.com/api/connect"
#define API_VERSION @"1"

@interface AppStats : NSObject {
	
	NSString* m_apiVersion;
	
	NSString* m_appId;
	NSString* m_appVersion;
	NSString* m_locale;
	
	NSString* m_deviceType;
	NSString* m_deviceVersion;
	NSString* m_deviceId;
	
	id m_delegate;
	
	// data received
	NSMutableData* m_receivedData;
}

//-(id) initWithAppId:(NSString*)_id Version:(NSString*)_version Delegate:(id)_delegate;
-(id) initWithDelegate:(id)_delegate;

-(BOOL) requestNotification;

@end

@protocol AppStatsDelegate <NSObject>
-(void) didReceiveNotification:(id)sender WithTitle:(NSString*)title Content:(NSString*)content URL:(NSString*)url;
-(void) didFaileToReceiveNotification:(id)sender;
@end
